import request from '@/utils/request'

/**
 * 登录
 * @param userName {String}
 * @param userPassword {String}
 */
export const login = (userName, userPassword) => {
    return request({
        url: 'user/login',
        method: 'post',
        data: { userName, userPassword }
    });
}

// 获取左侧菜单列表
export const getMenuTree = () => {
    return request({
        url: 'user/getMenuTree',
        method: 'post'
    });
}

// 通过菜单获取按钮列表-登录
export const getMenuButtons = (data) => {
    return request({
        url: 'user/getMenuButtons',
        method: 'post',
        showMsg: false,
        data: data
    });
}